<%@ taglib prefix="from" uri="http://www.springframework.org/tags/form" %>
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
<html>
<head>
    <title>电梯信息查询管理</title>
    <meta name="decorator" content="default"/>
    <script type="text/javascript">
        $(document).ready(function () {
            //$("#name").focus();
            $("#inputForm").validate({
                messages: {
                    halfmonthMainDate: {required: "请填写用例行维保日期"},
                    quarterMainDate: {required: "请填写季度维保日期"},
                    halfyearMainDate: {required: "请填写半年维保日期"},
                    yearMainDate: {required: "请填写年度维保日期"}
                },
                submitHandler: function (form) {
                    loading('正在提交，请稍等...');
                    form.submit();
                },
                errorContainer: "#messageBox",
                errorPlacement: function (error, element) {
                    $("#messageBox").text("输入有误，请先更正。");
                    if (element.is(":checkbox") || element.is(":radio") || element.parent().is(".input-append")) {
                        error.appendTo(element.parent().parent());
                    } else {
                        error.insertAfter(element);
                    }
                }
            });
        });

        var wd;
        var winTimer;
        function selectArea() {
            top.$.jBox.open("iframe:${ctx}/elmt/areas/findAll", "选择设备使用区域", 300, 420, {
                ajaxData: {selectIds: $("#sbsyqy").val()}, buttons: {"确定": "ok", "清除": "clear", "关闭": true}, submit: function (v, h, f) {
                    if (v == "ok") {
                        var tree = h.find("iframe")[0].contentWindow.tree;//h.find("iframe").contents();
                        var ids = [], names = [], nodes = [];
                        nodes = tree.getSelectedNodes();

                        for (var i = 0; i < nodes.length; i++) {
                            ids.push(nodes[i].id);
                            names.push(nodes[i].name);
                            break;
                        }
                        $("#sbsyqy").val(ids.join(",").replace(/u_/ig, ""));
                        $("#addressName").val(names.join(","));
                    } else if (v == "clear") {
                        $("#sbsyqy").val("");
                        $("#addressName").val("");
                    }
                }, loaded: function (h) {
                    $(".jbox-content", top.document).css("overflow-y", "hidden");
                }
            });
        }
    </script>
</head>
<body>
<form:form id="inputForm" modelAttribute="deviceParameters" action="${ctx}/elmt/deviceParameters/save" method="post" class="form-horizontal">
    <form:hidden path="tzsbbh"/>
    <form:hidden path="yxzt" value="1"/>
    <from:hidden path="sbsyqy" id="sbsyqy"/>
    <form:hidden path="wbdwdm"/>
    <form:hidden path="sydwdm"/>
    <input type="hidden" name="parentIdCach" id="parentIdCach" value="${parentIdCach}">
    <sys:message content="${message}"/>
    <div class="container-fluid">

        <div class="row" style="padding-top:5px">
            <div class="col-xs-6">
                <div class="form-group">
                    <label class="control-label col-xs-4"><font color="red">*</font>设备注册代码：</label>

                    <div class="col-xs-8">
                        <form:input path="sbzcdm" htmlEscape="false" maxlength="21" class="form-control input-sm input-xlarge required"/>
                        <span><font color="red">*</font></span>
                    </div>
                </div>
            </div>
            <div class="col-xs-6">
                <div class="form-group">
                    <label class="control-label col-xs-4"><font color="red">*</font>使用单位名称：</label>

                    <div class="col-xs-8">
                        <form:input path="sydwmc" readonly="true" htmlEscape="false" maxlength="20" class="form-control input-sm input-xlarge required"/>
                    </div>
                </div>
            </div>
        </div>

        <div class="row" style="padding-top:5px">
            <div class="col-xs-6">
                <div class="form-group">
                    <label class="control-label col-xs-4"><font color="red">*</font>设备使用区域：</label>

                    <div class="col-xs-8">
                        <form:input path="sbsyqymc" id="addressName" onclick="selectArea()" htmlEscape="false" maxlength="20" class="form-control input-sm input-xlarge required"/>
                        <!--<input class="btn" type="button" value="选择" onclick="selectArea()"/>-->
                    </div>
                </div>
            </div>
            <div class="col-xs-6">
                <div class="form-group">
                    <label class="control-label col-xs-4"><font color="red">*</font>设备使用地点：</label>

                    <div class="col-xs-8">
                        <form:input path="sbsydd" htmlEscape="false" maxlength="200" class="form-control input-sm input-xlarge required"/>
                    </div>
                </div>
            </div>
        </div>

        <div class="row" style="padding-top:5px">
            <div class="col-xs-6">
                <div class="form-group">
                    <label class="control-label col-xs-4"><font color="red">*</font>单位内部编号：</label>

                    <div class="col-xs-8">
                        <form:input path="dwnbbh" htmlEscape="false" maxlength="30" class="form-control input-sm input-xlarge required"/>
                    </div>
                </div>
            </div>
            <div class="col-xs-6">
                <div class="form-group">
                    <label class="control-label col-xs-4">经度/纬度：</label>

                    <div class="col-xs-8 inline">
                        <form:input path="jd" htmlEscape="false" maxlength="9" class="form-control input-sm input-small "/> /
                        <form:input path="wd" htmlEscape="false" maxlength="9" class="form-control input-sm input-small "/>
                    </div>
                </div>
            </div>
        </div>

        <div class="row" style="padding-top:5px">
            <div class="col-xs-6">
                <div class="form-group">
                    <label class="control-label col-xs-4">安全管理人员：</label>

                    <div class="col-xs-8">
                        <form:input path="aqglry" htmlEscape="false" maxlength="60" class="form-control input-sm input-xlarge "/>
                    </div>
                </div>
            </div>
            <div class="col-xs-6">
                <div class="form-group">
                    <label class="control-label col-xs-4">手机/座机：</label>

                    <div class="col-xs-8">
                        <form:input path="sj" htmlEscape="false" maxlength="60" class="form-control input-sm input-small "/> /
                        <form:input path="zj" htmlEscape="false" maxlength="60" class="form-control input-sm input-small "/>
                    </div>
                </div>
            </div>
        </div>

        <div class="row" style="padding-top:5px">
            <div class="col-xs-6">
                <div class="form-group">
                    <label class="control-label col-xs-4"><font color="red">*</font>设备品种：</label>

                    <div class="col-xs-8">
                        <form:select path="sbpz" class="form-control input-sm input-xlarge required">
                            <form:option value="" label=""/>
                            <form:options items="${fns:getDictList('XT_SBPZ')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
                        </form:select>
                    </div>
                </div>
            </div>

            <div class="col-xs-6">
                <div class="form-group">
                    <label class="control-label col-xs-4">出产国别：</label>

                    <div class="col-xs-8">
                        <form:select path="ccgb" class="form-control input-sm input-xlarge ">
                            <form:option value="" label=""/>
                            <form:options items="${fns:getDictList('PRODUCTION_COUNTRY')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
                        </form:select>
                    </div>
                </div>
            </div>
        </div>

        <div class="row" style="padding-top:5px">
            <div class="col-xs-6">
                <div class="form-group">
                    <label class="control-label col-xs-4">制造单位名称：</label>

                    <div class="col-xs-8">
                        <form:input path="zzdwdm" htmlEscape="false" maxlength="20" class="form-control input-sm input-xlarge "/>
                    </div>
                </div>
            </div>
            <div class="col-xs-6">
                <div class="form-group">
                    <label class="control-label col-xs-4">制造日期：</label>

                    <div class="col-xs-8">
                        <input name="zzrq" type="text" readonly="readonly" maxlength="20" class="form-control input-sm input-medium Wdate "
                               value="<fmt:formatDate value="${deviceParameters.zzrq}" pattern="yyyy-MM-dd HH:mm:ss"/>"
                               onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});"/>
                    </div>
                </div>
            </div>
        </div>

        <div class="row" style="padding-top:5px">
            <div class="col-xs-6">
                <div class="form-group">
                    <label class="control-label col-xs-4"><font color="red">*</font>设备型号：</label>

                    <div class="col-xs-8">
                        <form:input path="sbxh" htmlEscape="false" maxlength="100" class="form-control input-sm input-xlarge required"/>
                    </div>
                </div>
            </div>
            <div class="col-xs-6">
                <div class="form-group">
                    <label class="control-label col-xs-4">出厂编号：</label>

                    <div class="col-xs-8">
                        <form:input path="ccbh" htmlEscape="false" maxlength="40" class="form-control input-sm input-xlarge "/>
                    </div>
                </div>
            </div>
        </div>

        <div class="row" style="padding-top:5px">
            <div class="col-xs-6">
                <div class="form-group">
                    <label class="control-label col-xs-4">注册日期：</label>

                    <div class="col-xs-8">
                        <input name="zcrq" type="text" readonly="readonly" maxlength="20" class="form-control input-sm input-medium Wdate "
                               value="<fmt:formatDate value="${deviceParameters.zcrq}" pattern="yyyy-MM-dd HH:mm:ss"/>"
                               onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});"/>
                    </div>
                </div>
            </div>

            <div class="col-xs-6">
                <div class="form-group">
                    <label class="control-label col-xs-4">使用证号：</label>

                    <div class="col-xs-8">
                        <form:input path="syzh" htmlEscape="false" maxlength="40" class="form-control input-sm input-xlarge "/>
                    </div>
                </div>
            </div>
        </div>

        <div class="row" style="padding-top:5px">
            <div class="col-xs-6">
                <div class="form-group">
                    <label class="control-label col-xs-4">投入使用日期：</label>

                    <div class="col-xs-8">
                        <input name="trsyrq" type="text" readonly="readonly" maxlength="20" class="form-control input-sm input-medium Wdate "
                               value="<fmt:formatDate value="${deviceParameters.trsyrq}" pattern="yyyy-MM-dd HH:mm:ss"/>"
                               onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});"/>
                    </div>
                </div>
            </div>

            <div class="col-xs-6">
                <div class="form-group">
                    <label class="control-label col-xs-4">安装单位名称：</label>

                    <div class="col-xs-8">
                        <form:input path="azdwdm" htmlEscape="false" maxlength="20" class="form-control input-sm input-xlarge "/>
                    </div>
                </div>
            </div>
        </div>

        <div class="row" style="padding-top:5px">
            <div class="col-xs-6">
                <div class="form-group">
                    <label class="control-label col-xs-4">改造单位名称：</label>

                    <div class="col-xs-8">
                        <form:input path="gzdwdm" htmlEscape="false" maxlength="20" class="form-control input-sm input-xlarge "/>
                    </div>
                </div>
            </div>

            <div class="col-xs-6">
                <div class="form-group">
                    <label class="control-label col-xs-4">大修单位名称：</label>

                    <div class="col-xs-8">
                        <form:input path="dxdwdm" htmlEscape="false" maxlength="20" class="form-control input-sm input-xlarge "/>
                    </div>
                </div>
            </div>
        </div>

        <div class="row" style="padding-top:5px">
            <div class="col-xs-6">
                <div class="form-group">
                    <label class="control-label col-xs-4">控制方式：</label>

                    <div class="col-xs-8">
                        <form:select path="kzfs" class="form-control input-sm input-xlarge ">
                            <form:option value="" label=""/>
                            <form:options items="${fns:getDictList('CONTROL_MODE')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
                        </form:select>
                    </div>
                </div>
            </div>

            <div class="col-xs-6">
                <div class="form-group">
                    <label class="control-label col-xs-4">额定载荷：</label>

                    <div class="col-xs-8">
                        <form:input path="edzh" htmlEscape="false" class="form-control input-sm input-xlarge  number"/>
                    </div>
                </div>
            </div>
        </div>

        <div class="row" style="padding-top:5px">
            <div class="col-xs-6">
                <div class="form-group">
                    <label class="control-label col-xs-4">运行速度：</label>

                    <div class="col-xs-8">
                        <form:input path="yxsd" htmlEscape="false" class="form-control input-sm input-xlarge  number"/>
                    </div>
                </div>
            </div>

            <div class="col-xs-6">
                <div class="form-group">
                    <label class="control-label col-xs-4">层数/站数：</label>

                    <div class="col-xs-8">
                        <form:input path="cs" htmlEscape="false" maxlength="4" class="form-control input-sm input-small digits"/> /
                        <form:input path="zs" htmlEscape="false" maxlength="4" class="form-control input-sm input-small digits"/>
                    </div>
                </div>
            </div>
        </div>

        <div class="row" style="padding-top:5px">
            <div class="col-xs-6">
                <div class="form-group">
                    <label class="control-label col-xs-4">电机功率：</label>

                    <div class="col-xs-8">
                        <form:input path="djgl" htmlEscape="false" class="form-control input-sm input-xlarge  number"/>
                    </div>
                </div>
            </div>

            <div class="col-xs-6">
                <div class="form-group">
                    <label class="control-label col-xs-4">输送能力：</label>

                    <div class="col-xs-8">
                        <form:input path="ssnl" htmlEscape="false" class="form-control input-sm input-xlarge  number"/>
                    </div>
                </div>
            </div>
        </div>

        <div class="row" style="padding-top:5px">
            <div class="col-xs-6">
                <div class="form-group">
                    <label class="control-label col-xs-4">上行速度：</label>

                    <div class="col-xs-8">
                        <form:input path="sxsd" htmlEscape="false" class="form-control input-sm input-xlarge  number"/>
                    </div>
                </div>
            </div>

            <div class="col-xs-6">
                <div class="form-group">
                    <label class="control-label col-xs-4">下行速度：</label>

                    <div class="controls">
                        <form:input path="xxsd" htmlEscape="false" class="form-control input-sm input-xlarge  number"/>
                    </div>
                </div>
            </div>
        </div>

        <div class="row" style="padding-top:5px">
            <div class="col-xs-6">
                <div class="form-group">
                    <label class="control-label col-xs-4">轿厢尺寸：</label>

                    <div class="col-xs-8">
                        <form:input path="jxcc" htmlEscape="false" maxlength="20" class="form-control input-sm input-xlarge "/>
                    </div>
                </div>
            </div>

            <div class="col-xs-6">
                <div class="form-group">
                    <label class="control-label col-xs-4">开门方向：</label>

                    <div class="col-xs-8">
                        <form:input path="kmfx" htmlEscape="false" maxlength="20" class="form-control input-sm input-xlarge "/>
                    </div>
                </div>
            </div>
        </div>

        <div class="row" style="padding-top:5px">
            <div class="col-xs-6">
                <div class="form-group">
                    <label class="control-label col-xs-4">使用区域长度：</label>

                    <div class="col-xs-8">
                        <form:input path="syqycd" htmlEscape="false" class="form-control input-sm input-xlarge  number"/>
                    </div>
                </div>
            </div>

            <div class="col-xs-6">
                <div class="form-group">
                    <label class="control-label col-xs-4">走行距离：</label>

                    <div class="col-xs-8">
                        <form:input path="xzjl" htmlEscape="false" class="form-control input-sm input-xlarge  number"/>
                    </div>
                </div>
            </div>
        </div>

        <div class="row" style="padding-top:5px">
            <div class="col-xs-6">
                <div class="form-group">
                    <label class="control-label col-xs-4">倾角：</label>

                    <div class="col-xs-8">
                        <form:input path="qj" htmlEscape="false" class="form-control input-sm input-xlarge  number"/>
                    </div>
                </div>
            </div>

            <div class="col-xs-6">
                <div class="form-group">
                    <label class="control-label col-xs-4">提升高度：</label>

                    <div class="col-xs-8">
                        <form:input path="tsgd" htmlEscape="false" class="form-control input-sm input-xlarge  number"/>
                    </div>
                </div>
            </div>
        </div>

        <div class="row" style="padding-top:5px">
            <div class="col-xs-6">
                <div class="form-group">
                    <label class="control-label col-xs-4">阶梯宽度：</label>

                    <div class="col-xs-8">
                        <form:input path="tjkd" htmlEscape="false" class="form-control input-sm input-xlarge  number"/>
                    </div>
                </div>
            </div>

            <div class="col-xs-6">
                <div class="form-group">
                    <label class="control-label col-xs-4">顶升方式：</label>

                    <div class="col-xs-8">
                        <form:input path="dsfs" htmlEscape="false" maxlength="20" class="form-control input-sm input-xlarge "/>
                    </div>
                </div>
            </div>
        </div>

        <div class="row" style="padding-top:5px">
            <div class="col-xs-6">
                <div class="form-group">
                    <label class="control-label col-xs-4">油缸型式：</label>

                    <div class="col-xs-8">
                        <form:input path="ygxs" htmlEscape="false" maxlength="20" class="form-control input-sm input-xlarge "/>
                    </div>
                </div>
            </div>

            <div class="col-xs-6">
                <div class="form-group">
                    <label class="control-label col-xs-4">油缸数量：</label>

                    <div class="col-xs-8">
                        <form:input path="ygsl" htmlEscape="false" maxlength="4" class="form-control input-sm input-xlarge  digits"/>
                    </div>
                </div>
            </div>
        </div>

        <div class="row" style="padding-top:5px">
            <div class="col-xs-6">
                <div class="form-group">
                    <label class="control-label col-xs-4"><font color="red">*</font>例行维保日期：</label>

                    <div class="col-xs-8">
                        <input name="halfmonthMainDate" type="text" readonly="readonly" maxlength="20" class="form-control input-sm input-medium Wdate required"
                               value="<fmt:formatDate value="${deviceParameters.halfmonthMainDate}" pattern="yyyy-MM-dd HH:mm:ss"/>"
                               onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});"/>
                    </div>
                </div>
            </div>

            <div class="col-xs-6">
                <div class="form-group">
                    <label class="control-label col-xs-4"><font color="red">*</font>季度维保日期：</label>

                    <div class="col-xs-8">
                        <input name="quarterMainDate" type="text" readonly="readonly" maxlength="20" class="form-control input-sm input-medium Wdate required"
                               value="<fmt:formatDate value="${deviceParameters.quarterMainDate}" pattern="yyyy-MM-dd HH:mm:ss"/>"
                               onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});"/>
                    </div>
                </div>
            </div>
        </div>

        <div class="row" style="padding-top:5px">
            <div class="col-xs-6">
                <div class="form-group">
                    <label class="control-label col-xs-4"><font color="red">*</font>半年维保日期：</label>

                    <div class="col-xs-8">
                        <input name="halfyearMainDate" type="text" readonly="readonly" maxlength="20" class="form-control input-sm input-medium Wdate required"
                               value="<fmt:formatDate value="${deviceParameters.halfyearMainDate}" pattern="yyyy-MM-dd HH:mm:ss"/>"
                               onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});"/>
                    </div>
                </div>
            </div>

            <div class="col-xs-6">
                <div class="form-group">
                    <label class="control-label col-xs-4"><font color="red">*</font>年度维保日期：</label>

                    <div class="col-xs-8">
                        <input name="yearMainDate" type="text" readonly="readonly" maxlength="20" class="form-control input-sm input-medium Wdate required"
                               value="<fmt:formatDate value="${deviceParameters.yearMainDate}" pattern="yyyy-MM-dd HH:mm:ss"/>"
                               onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});"/>
                    </div>
                </div>
            </div>
        </div>
    </div>
</form:form>
</body>
</html>